From 5a0cc1837807105878a64c81fca3b6c183ad734d Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 26 Aug 2005 22:07:06 +0000 Subject: [PATCH] configure.ac Makefile.am docs/Makefile.am check for inkscape and w3m which 2005-08-27 Sven Neumann * configure.ac * Makefile.am * docs/Makefile.am * docs/graphics/Makefile.am: check for inkscape and w3m which are needed to build the documentation. Compile without them but bail out on 'make dist'. --- ChangeLog | 9 +++++++++ Makefile.am | 42 ++++++++++++++++++++++++--------------- configure.ac | 6 ++++++ docs/Makefile.am | 4 +--- docs/graphics/Makefile.am | 19 +++++++++++++++--- tests/.cvsignore | 1 + 6 files changed, 59 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index aee8929..557ee6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-08-27 Sven Neumann + + * configure.ac + * Makefile.am + * docs/Makefile.am + * docs/graphics/Makefile.am: check for inkscape and w3m which are + needed to build the documentation. Compile without them but bail + out on 'make dist'. + 2005-08-26 Øyvind Kolås * tests/rgb_to_bgr.c: added component shuffling test diff --git a/Makefile.am b/Makefile.am index 5bbf529..b877b1c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,31 +4,39 @@ SUBDIRS = babl \ tests \ docs - -DIST_SUBDIRS = babl \ - tests \ - docs - pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = babl.pc -EXTRA_DIST = \ - .cvsignore \ +built_dist_files = \ + README \ + babl.pc + +EXTRA_DIST = $(built_dist_files) \ + AUTHORS \ COPYING \ - ChangeLog \ - INSTALL.in \ + INSTALL \ NEWS \ - babl.pc.in \ - autogen.sh + ChangeLog \ + autogen.sh \ + babl.pc.in + +DISTCLEANFILES = $(built_dist_files) -BUILT_EXTRA_DIST = \ - README \ - babl.pc .PHONY: snapshot -README: - echo "Eek!" > $@ + +if HAVE_W3M +dist-check-w3m: + +README: docs/index.html + $(W3M) -cols 72 -dump $< > $@ +else +dist-check-w3m: + @echo "*** w3m must be available in order to make dist" + @false +endif + snapshot: $(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"` @@ -39,3 +47,5 @@ distclean-local: if test $(srcdir) = .; then :; else \ rm -f $(BUILT_EXTRA_DIST); \ fi + +dist-hook: dist-check-w3m diff --git a/configure.ac b/configure.ac index c89a352..fc3babf 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,12 @@ if eval "test x$GCC = xyes"; then esac fi +AC_PATH_PROG(INKSCAPE, inkscape, no) +AM_CONDITIONAL(HAVE_INKSCAPE, test "x$INKSCAPE" != "xno") + +AC_PATH_PROG(W3M, w3m, no) +AM_CONDITIONAL(HAVE_W3M, test "x$W3M" != "xno") + dnl =========================================================================== AC_CONFIG_FILES( diff --git a/docs/Makefile.am b/docs/Makefile.am index 0d2d7ac..2d946f1 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -25,7 +25,7 @@ MAINTAINERCLEANFILES = index.html all: $(HTML_FILES) -index.html: index-static.html $(top_builddir)/tests/babl_html_dump ../AUTHORS ../NEWS +index.html: index-static.html $(top_builddir)/tests/babl_html_dump $(top_srcdir)/AUTHORS $(top_srcdir)/NEWS cp $< $@ (TMPFILE=`tempfile`;\ $(top_builddir)/tests/babl_html_dump > $$TMPFILE;\ @@ -34,8 +34,6 @@ index.html: index-static.html $(top_builddir)/tests/babl_html_dump ../AUTHORS .. $(top_srcdir)/docs/tools/xml_insert.sh $@ AUTHORS $(top_srcdir)/AUTHORS $(top_srcdir)/docs/tools/xml_insert.sh $@ NEWS $(top_srcdir)/NEWS - - w3m -cols 72 -dump $@ > ../README distclean-local: if test $(srcdir) = .; then :; else \ diff --git a/docs/graphics/Makefile.am b/docs/graphics/Makefile.am index 615eee9..57b6403 100644 --- a/docs/graphics/Makefile.am +++ b/docs/graphics/Makefile.am @@ -1,7 +1,9 @@ +if HAVE_INKSCAPE PNG_FILES = \ babl-a4poster.png \ babl-16x16.png \ babl-48x48.png +endif SVG_FILES = \ babl-a4poster.svg \ @@ -18,12 +20,23 @@ MAINTAINERCLEANFILES = $(PNG_FILES) all: $(MAINTAINERCLEANFILES) -%.png : %.svg - inkscape -e $@ $< + +if HAVE_INKSCAPE +dist-check-inkscape: + +%.png: %.svg + $(INSCAPE) -e $@ $< # the png version of the a4 poster is used as a webgraphic # , thus it is rendered with the background alpha set to # 0.0 babl-a4poster.png: babl-a4poster.svg - inkscape -e $@ $< -w 256 -y 0 + $(INSCAPE) -e $@ $< -w 256 -y 0 +else +dist-check-inkscape: + @echo "*** inkscape must be available in order to make dist" + @false +endif + +dist-hook: dist-check-inkscape diff --git a/tests/.cvsignore b/tests/.cvsignore index 3842de2..728f45d 100644 --- a/tests/.cvsignore +++ b/tests/.cvsignore @@ -6,6 +6,7 @@ float_to_u8 grayscale_to_rgb introspect nop +rgb_to_bgr rgb_to_lab_to_rgb rgb_to_ycbcr rgb_to_ycbcr_to_rgb -- 2.30.2